package com.lucker.ds.model;

import java.util.Date;

/**
 * cai_piao_simulation_plan
 * @author 
 */
public class CaiPiaoSimulationPlan extends BaseValueObject {
    private Long id;

    /**
     * 投注用户ID
     */
    private Long userId;

    /**
     * 方案状态  进行中，未中奖，已中奖，取消
     */
    private String planStatus;

    /**
     * 方案需要消耗的最大金币数
     */
    private Long planTotalMoney;

    /**
     * 彩种ID
     */
    private Long caiId;

    /**
     * 彩种名称
     */
    private String caiName;

    /**
     * 彩种分类ID
     */
    private Integer caiTypeId;

    /**
     * 开始期号
     */
    private String beginIssueNo;

    /**
     * 实际消耗币数量
     */
    private Long lastMoney;

    /**
     * 投注时间
     */
    private Date betTime;

    private String customQuerySqlText = null;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getPlanStatus() {
        return planStatus;
    }

    public void setPlanStatus(String planStatus) {
        this.planStatus = planStatus;
    }

    public Long getPlanTotalMoney() {
        return planTotalMoney;
    }

    public void setPlanTotalMoney(Long planTotalMoney) {
        this.planTotalMoney = planTotalMoney;
    }

    public Long getCaiId() {
        return caiId;
    }

    public void setCaiId(Long caiId) {
        this.caiId = caiId;
    }

    public String getCaiName() {
        return caiName;
    }

    public void setCaiName(String caiName) {
        this.caiName = caiName;
    }

    public Integer getCaiTypeId() {
        return caiTypeId;
    }

    public void setCaiTypeId(Integer caiTypeId) {
        this.caiTypeId = caiTypeId;
    }

    public String getBeginIssueNo() {
        return beginIssueNo;
    }

    public void setBeginIssueNo(String beginIssueNo) {
        this.beginIssueNo = beginIssueNo;
    }

    public Long getLastMoney() {
        return lastMoney;
    }

    public void setLastMoney(Long lastMoney) {
        this.lastMoney = lastMoney;
    }

    public Date getBetTime() {
        return betTime;
    }

    public void setBetTime(Date betTime) {
        this.betTime = betTime;
    }

    public void setCustomQuerySqlText(String customQuerySqlText) {
        this.customQuerySqlText = customQuerySqlText;
    }

    public String getCustomQuerySqlText() {
        return customQuerySqlText;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByUserId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_id asc";
            }else{
                this.orderStr = this.orderStr + ",user_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_id desc";
            }else{
                this.orderStr = this.orderStr + ",user_id desc";
            }
        }
    }

    public void orderByPlanStatus(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by plan_status asc";
            }else{
                this.orderStr = this.orderStr + ",plan_status asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by plan_status desc";
            }else{
                this.orderStr = this.orderStr + ",plan_status desc";
            }
        }
    }

    public void orderByPlanTotalMoney(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by plan_total_money asc";
            }else{
                this.orderStr = this.orderStr + ",plan_total_money asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by plan_total_money desc";
            }else{
                this.orderStr = this.orderStr + ",plan_total_money desc";
            }
        }
    }

    public void orderByCaiId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by cai_id asc";
            }else{
                this.orderStr = this.orderStr + ",cai_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by cai_id desc";
            }else{
                this.orderStr = this.orderStr + ",cai_id desc";
            }
        }
    }

    public void orderByCaiName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by cai_name asc";
            }else{
                this.orderStr = this.orderStr + ",cai_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by cai_name desc";
            }else{
                this.orderStr = this.orderStr + ",cai_name desc";
            }
        }
    }

    public void orderByCaiTypeId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by cai_type_id asc";
            }else{
                this.orderStr = this.orderStr + ",cai_type_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by cai_type_id desc";
            }else{
                this.orderStr = this.orderStr + ",cai_type_id desc";
            }
        }
    }

    public void orderByBeginIssueNo(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by begin_issue_no asc";
            }else{
                this.orderStr = this.orderStr + ",begin_issue_no asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by begin_issue_no desc";
            }else{
                this.orderStr = this.orderStr + ",begin_issue_no desc";
            }
        }
    }

    public void orderByLastMoney(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by last_money asc";
            }else{
                this.orderStr = this.orderStr + ",last_money asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by last_money desc";
            }else{
                this.orderStr = this.orderStr + ",last_money desc";
            }
        }
    }

    public void orderByBetTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by bet_time asc";
            }else{
                this.orderStr = this.orderStr + ",bet_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by bet_time desc";
            }else{
                this.orderStr = this.orderStr + ",bet_time desc";
            }
        }
    }
}